package cn.xxlucky.xssdk01.pojo;

import cn.xxlucky.xssdk01.pojo.shard.Message;
import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

@ApiModel("通用请求封装实体类")
public class ApiRequest {

    @ApiModelProperty(value = "请求模型版本", required = true, allowableValues = "lite, generalv3, pro-128k, generalv3.5, max-32k, 4.0Ultra")
    @JSONField(name = "model")
    private String model;

    @ApiModelProperty(value = "用户唯一标识")
    @JSONField(name = "user")
    private String user;

    @ApiModelProperty(value = "消息内容数组", required = true)
    @JSONField(name = "messages")
    private List<Message> messages;

    @ApiModelProperty(value = "核采样阈值", example = "1.0")
    @JSONField(name = "temperature")
    private Float temperature;

    @ApiModelProperty(value = "Top-P值", example = "1")
    @JSONField(name = "top_p")
    private Float topP;

    @ApiModelProperty(value = "Top-K值", example = "4")
    @JSONField(name = "top_k")
    private Integer topK;

    @ApiModelProperty(value = "出现惩罚值", example = "0")
    @JSONField(name = "presence_penalty")
    private Float presencePenalty;

    @ApiModelProperty(value = "频率惩罚值", example = "0")
    @JSONField(name = "frequency_penalty")
    private Float frequencyPenalty;

    @ApiModelProperty(value = "是否启用流式返回", example = "false")
    @JSONField(name = "stream")
    private Boolean stream;

    @ApiModelProperty(value = "最大tokens长度", example = "4096")
    @JSONField(name = "max_tokens")
    private Integer maxTokens;

    @ApiModelProperty(value = "返回结果格式", allowableValues = "text, json_object")
    @JSONField(name = "response_format")
    private String responseFormat;

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getUser() {
        return user;
    }

    public void setUser(String user) {
        this.user = user;
    }

    public List<Message> getMessages() {
        return messages;
    }

    public void setMessages(List<Message> messages) {
        this.messages = messages;
    }

    public Float getTemperature() {
        return temperature;
    }

    public void setTemperature(Float temperature) {
        this.temperature = temperature;
    }

    public Float getTopP() {
        return topP;
    }

    public void setTopP(Float topP) {
        this.topP = topP;
    }

    public Integer getTopK() {
        return topK;
    }

    public void setTopK(Integer topK) {
        this.topK = topK;
    }

    public Float getPresencePenalty() {
        return presencePenalty;
    }

    public void setPresencePenalty(Float presencePenalty) {
        this.presencePenalty = presencePenalty;
    }

    public Float getFrequencyPenalty() {
        return frequencyPenalty;
    }

    public void setFrequencyPenalty(Float frequencyPenalty) {
        this.frequencyPenalty = frequencyPenalty;
    }

    public Boolean getStream() {
        return stream;
    }

    public void setStream(Boolean stream) {
        this.stream = stream;
    }

    public Integer getMaxTokens() {
        return maxTokens;
    }

    public void setMaxTokens(Integer maxTokens) {
        this.maxTokens = maxTokens;
    }

    public String getResponseFormat() {
        return responseFormat;
    }

    public void setResponseFormat(String responseFormat) {
        this.responseFormat = responseFormat;
    }
}
